package top.go2do.auth.business.user.service.decorator;

import top.go2do.auth.business.user.module.LoginCheckBO;
import top.go2do.auth.business.user.module.LoginResultVO;
import top.go2do.common.module.UserPO;
import top.go2do.auth.business.user.service.LoginService;

/**
 * @Description
 * @Author xingyj
 * @CreateTime 2025/4/1 17:48
 */
public abstract class AbstractLoginDecorator implements LoginService {
    protected LoginService loginService;

    public AbstractLoginDecorator(LoginService loginService) {
        this.loginService = loginService;
    }

    @Override
    public boolean loginCheck(LoginCheckBO checkBO) {
        return loginService.loginCheck(checkBO);
    }

    @Override
    public LoginResultVO generateLoginResult(Long userId) {
        return loginService.generateLoginResult(userId);
    }

    @Override
    public LoginResultVO toLoginWithToken(LoginCheckBO checkBO) {
        return loginService.toLoginWithToken(checkBO);
    }

    @Override
    public UserPO findByAppIdAndUserName(String appId, String username) {
        return loginService.findByAppIdAndUserName(appId, username);
    }
}
